<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Stars</title>

        <link rel="stylesheet" type="ttext/css" href="css/star-style.css" />
        <!--<script src="http://code.jquery.com/jquery-latest.js"></script> -->
        <script src="jscript/jquery-latest.js"></script>
        <!-- <script src="scripts/stars.js"></script> -->
        <script src="jscript/stars_fb.js"></script>
    </head>
    <body>
        <?php
        include_once 'pages/db.php';
        ?>


        <div class="rate_choice">
            <table>
                <tr>
                    <td>Cleanliness: </td>
                    <td>
                        <div id="r1" class="rate_widget">
                            <div class="star_1 ratings_stars"></div>
                            <div class="star_2 ratings_stars"></div>
                            <div class="star_3 ratings_stars"></div>
                            <div class="star_4 ratings_stars"></div>
                            <div class="star_5 ratings_stars"></div>
                            <div class="total_votes">vote data</div>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>Price: </td>
                    <td>
                        <div id="r2" class="rate_widget">
                            <div class="star_1 ratings_stars"></div>
                            <div class="star_2 ratings_stars"></div>
                            <div class="star_3 ratings_stars"></div>
                            <div class="star_4 ratings_stars"></div>
                            <div class="star_5 ratings_stars"></div>
                            <div class="total_votes">vote data</div>
                        </div>
                    </td>
                </tr>


                <tr>
                    <td>Fun: </td>
                    <td>
                        <div id="r8" class="rate_widget">
                            <div class="star_1 ratings_stars"></div>
                            <div class="star_2 ratings_stars"></div>
                            <div class="star_3 ratings_stars"></div>
                            <div class="star_4 ratings_stars"></div>
                            <div class="star_5 ratings_stars"></div>
                            <div class="total_votes">vote data</div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>Service: </td>
                    <td>
                        <div id="r9" class="rate_widget">
                            <div class="star_1 ratings_stars"></div>
                            <div class="star_2 ratings_stars"></div>
                            <div class="star_3 ratings_stars"></div>
                            <div class="star_4 ratings_stars"></div>
                            <div class="star_5 ratings_stars"></div>
                            <div class="total_votes">vote data</div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>Location: </td>
                    <td>
                        <div id="r5" class="rate_widget">
                            <div class="star_1 ratings_stars"></div>
                            <div class="star_2 ratings_stars"></div>
                            <div class="star_3 ratings_stars"></div>
                            <div class="star_4 ratings_stars"></div>
                            <div class="star_5 ratings_stars"></div>
                            <div class="total_votes">vote data</div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>Security: </td>
                    <td>
                        <div id="r7" class="rate_widget">
                            <div class="star_1 ratings_stars"></div>
                            <div class="star_2 ratings_stars"></div>
                            <div class="star_3 ratings_stars"></div>
                            <div class="star_4 ratings_stars"></div>
                            <div class="star_5 ratings_stars"></div>
                            <div class="total_votes">vote data</div>
                        </div>
                    </td>
                </tr>

            </table>
        </div>

        <?php
        include_once 'pages/staticStars.php';
        $ss = new staticStars(4);
        $ss->printStars();
        echo $ss->getFromDb(10).'---';
        ?>


        <?php
        $conn = dbConnect("sib");

        $result = mysql_query("SELECT IDRate FROM rateing", $conn);
        while ($row = mysql_fetch_array($result)) {
            $avg = $ss->getFromDb($row["IDRate"]);
            $ss->printStars();
            //echo "<p>$avg</p>";
        }
        ?>

    </body>
</html>
